package com.yunpuvip.sachet.rest.modular.example;

import com.yunpuvip.sachet.modular.constant.response.ServerResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 常规控制器
 *
 * @author fengshuonan
 * @date 2017-08-23 16:02
 */
@Controller
@RequestMapping("/hello")
public class ExampleController {

    @RequestMapping("1info")
    @ResponseBody
    public ServerResponse getTestInfo(Integer id) {
        if (id == null) {
            return ServerResponse.creatByErrorMsg("请输入id值");
        }
        return ServerResponse.creatBySuccessMessage("HHHHHH");
    }
}
